package com.haixiaoke.saas.enterprise.task;

import com.haixiaoke.saas.workOrder.service.IWorkOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 工单定时任务
 * @author panda
 * @Date 2024/9/11
 **/
@Component
public class WorkOrderTask {

    @Autowired
    private IWorkOrderService workOrderService;

    /**
     * 工单超时任务--0点开始每隔一小时执行一次
     */
    @Scheduled(cron = "0 0 0/1 * * ? ")
    public void workOrderOvertimeTask() {
        workOrderService.workOrderOvertimeTask();
    }
}
